﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace Infrastructure.ElasticSearch.ParentChilds
{ 
    public interface IPageBase
    {
        int Total { get; set; }
        int Page { get; set; }
        int Size { get; set; }

        /// <summary>
        /// 是否获取总数
        /// </summary>
        bool TrackTotalHits { get; set; }

    }


    public class CustomerQueryPageBase : IPageBase
    {
        /// <summary>
        /// 操作页面代码（PageCodeEnum）
        /// </summary>
        [JsonProperty("pageCode")]
        public string PageCode { get; set; } = string.Empty;

        [JsonProperty("total")]
        public int Total { get; set; } = 0;
        [JsonProperty("pageIndex")]
        public int Page { get; set; } = 0;

        [JsonProperty("pageSize")]
        public int Size { get; set; } = 10;

        [JsonProperty("trackTotalHits")]
        public bool TrackTotalHits { get; set; } = false;
    }
}
